import org.omg.CORBA.PUBLIC_MEMBER;

class Date {
    public int year;
    public int month;
    public int day;
    /*
    public void setDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;

        this.year = y;
        this.month = m;
        this.day = d;

    }
    */
    public void showDate(){
        System.out.println(this.year+"."+this.month+"."+this.day);
    }
    /*
    public Date() {
        this(2022,10,26);
    }
    */
    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }
}
class Computer {
    private String cpu;
    private String memory;
    public String screen;

    public Computer(String cpu, String memory, String screen) {
        this.cpu = cpu;
        this.memory = memory;
        this.screen = screen;
    }
    public void showParameter(){
        System.out.println(this.cpu + " " + this.memory + " " + this.screen);
    }
}
class Student {
    public String name;
    public int age;
    public String gender;
    public static String classroom;

    public static String getClassroom() {
        return classroom;
    }
    static {
        classroom = "计科U4";
    }
}
public class Test {
    public static void main(String[] args) {
        Student stu1 = new Student();
        Student stu2 = new Student();
        Student stu3 = new Student();
        System.out.println(Student.getClassroom());
    }
    public static void main3(String[] args) {
        Computer com1 = new Computer("i5","8G","13*14");
        com1.showParameter();
    }
    public static void main2(String[] args) {
        Date date1 = new Date(2022,10,26);
        date1.showDate();
    }
    public static int add(int x, int y) {
        return x + y;
    }
    public static double add(double x, double y) {
        return x + y;
    }
    public static int factor(int n) {
        if(n == 1) {
            return 1;
        }
        return n * factor(n-1);
    }
    public static void split(int n) {
        if(n > 9) {
            split(n / 10);
        }
        System.out.print(n % 10 + " ");
    }
    public static void main1(String[] args) {
        System.out.println(add(10,20));
        System.out.println(add(1.1,2.2));

        System.out.println(factor(6));
        split(3694);
        System.out.println();

        //Date date1 = new Date();
        //Date date2 = new Date();
        //Date date3 = new Date();
        //date1.setDate(2022,10,26);
        //date2.setDate(2022,10,27);
        //date3.setDate(2022,10,28);
        //date1.showDate();
        //date2.showDate();
        //date3.showDate();
    }
}
